|
|
|
BlueCielo Publisher 2012 Administrator's Guide | BlueCielo ECM Solutions |
To register documents with the Task Server, you submit a task to the Task Server from your code. You submit the task to the MeridianTask object that is instantiated by a Publisher extension for the PowerUser. That extension is registered as described in Configuring a Meridian Enterprise application server. The Task Server executes the task using the options of the publishing job that is specified by the publish code that you pass to the MeridianTask object. For information about programmatically registering documents without using the Task Server, see Registering programmatically without the Task Server.
Note Using the MeridianTask object requires the following:
To register documents using the Task Server:
The task can be submitted by any event or command where a Document object exists. For more information about the Submit method, see the BlueCielo Meridian Enterprise VBScript API Reference.
Note In VBScript, you only have access to the current document; therefore, publishing tasks can only be created for the current document.
Sub PublishCommand_Execute(Batch) ' Set arguments for the task. Vault.Task.Set "JobCode", "3BA9DF" Vault.Task.Set "FeedBackProperty", "Custom.PublishStatus" ' Register the current document for publishing. Vault.Task.Submit "BCPublisher.MeridianTask", Document End Sub
Private Sub btnPublish_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles btnPublish.Click ' Get the current document to publish. Dim document As BCDocument = ExtensionHost.CurrentObject ' Set arguments for the task. Dim task As BCSTask = ExtensionHost.ScriptObjects.Vault.Task task.Set("JobCode", "3BA9DF") task.Set("FeedbackProperty", "Custom.PublishStatus") ' Register the document for publishing. task.Submit("BCPublisher.MeridianTask", document) End Sub
Private Sub DoIt(ByVal repository As BCRepository) ' Get document to publish. Dim document As BCDocument = repository.GetFSObject("\MyDocument.doc") Using taskServer As BCTaskServer = New BCTaskServer(repository.AMServer.AMTaskServerMachine) ' Set arguments for the task. Dim args As Dictionary(Of String, Object) = New Dictionary(Of String, Object) args("JobCode") = "3BA9DF" args("FeedbackProperty") = "Custom.PublishStatus" ' Register the document for publishing. taskServer.SubmitTask( _ "BCPublisher.MeridianTask", _ args, _ Nothing, _ 0, _ document.ID, _ Nothing, _ Nothing, _ Nothing, _ Nothing) End Using End Sub
Private Sub DoIt(ByVal repository As BCRepository) ' Get document to publish. Dim document As BCDocument = repository.GetFSObject("\MyDocument.doc") Using services As BCServiceProvider = New BCServiceProvider(repository) Using metadata As BCSMetadata = New BCSMetadata(services) ' Set arguments for the task. Dim task As BCSTask = metadata.Vault.Task task.Set("JobCode", "3BA9DF") task.Set("FeedbackProperty", "Custom.PublishStatus") ' Register the document for publishing. task.Submit("BCPublisher.MeridianTask", document) End Using End Using End Sub
Related concepts
Registering documents for publication
Related tasks
Copyright © 2000-2012 BlueCielo ECM Solutions |